import request from '@sutpc/axios';
import config from '@/global/config.js'

/**
 * 获取图层树
 * @returns
 */
export function getLayerTree() {
  return request.get({
    url: config.apiBase + 'test/find',
    // 不显示loading
    loading: false
  });
} 
// 路口设备
export const getTiannetApi = (id) => {
  return request.get({
    url: config.apiTiannetBase + `api/ps-show/index/getJunctionDetail?junctionId=${id}`,
    loading: false
  })
}
// 搜索路口
export const searchRoadApi = (roadName) => {
  return request.get({
    url: config.apiTiannetBase + `api/ps-show/index/search?q=${roadName}`,
    loading: false
  })
}

// 路口事件个数
export function getEventCount() {
  return request.get({
    url: config.apiTiannetBase + `api/ps-show/global/getEventCount`,
    loading: false
  })
}